package Arithmetic;

import junit.framework.TestCase;

/**
 * Created by jxy6996 on 2017/5/21.
 */
public class CalculatorTest extends TestCase {
    public void testEvaluate() throws Exception {
        Calculator c = new Calculator();
        assertEquals("2",c.evaluate("1 1 +"));
    }

    public void testIsOperator() throws Exception {
        Calculator c = new Calculator();
        assertEquals(true,c.isOperator("+"));
    }

    public void testTranIntoRationalNum() throws Exception {
        Calculator c = new Calculator();
        assertEquals("1/3",c.tranIntoRationalNum("3/9"));
    }
}